# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=zita-njbridge
pkgver=0.4.8
pkgrel=2
pkgdesc="Jack client to transmit audio over a local IP network"
arch=(loong64 x86_64)
url="https://kokkinizita.linuxaudio.org/linuxaudio/"
license=(GPL3)
groups=(pro-audio)
depends=(gcc-libs glibc)
makedepends=(jack zita-resampler)
source=("https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('0e2b5882bfdc9a67b84c6446bcbb75e496c64ed19ac3ddf06dddc6e10fe57510f27096c341a6e3b2e563d10489ecc1acb5666ff4c4df10586e648c5d62164832')
b2sums=('2079b563959be2ccad95176b62e6634efc1e9f54e9c70cb8de2064a5973aaa04b72a10d318554472ba493e7ce57e37fb9b71ed8962fc66aac22330b58d5904d5')

prepare() {
  # strip march=native
  sed -e '/native/d' -i $pkgname-$pkgver/source/Makefile
}

build() {
  make -C $pkgname-$pkgver/source
}

package() {
  depends+=(
    jack libjack.so
    zita-resampler libzita-resampler.so
  )

  make PREFIX=/usr DESTDIR="$pkgdir" install -C $pkgname-$pkgver/source
  install -vDm 644 $pkgname-$pkgver/{AUTHORS,README} -t "$pkgdir/usr/share/doc/$pkgname/"
}
# vim:set ts=2 sw=2 et:
